The present invention relates to a storage device, which communicates with a plurality of information-processing devices connected to the storage device by a network through the network. More particularly, the present invention relates to a storage device having a function of controlling a buffer used as a network interface.
Accompanying penetration of an information technology into the mainstay jobs of companies and organizations, the importance and amount of electronic data owned by the companies and the organizations are increasing. It is thus necessary to keep an accurate copy of data to protect the data against a large-scale accident such as an earthquake, a power-service interruption or a terror happening to such companies or such organizations and to allow the data to be recovered speedily should the data be damaged by such an accident.
In order to localize damage of such a disaster, normally, such data located at a particular site is copied to another site geographically separated from the particular site. Typically, the other site is separated from the particular site by a distance of several hundreds of kilometers. At each site, a host and a storage system such as a storage device for storing data are installed. A site is connected to another site by wide-area Ethernet or a wide-area network (WAN) such as the Internet. A storage device for storing master data is referred to as a master storage device. A host connected to a master storage device is referred to as a master host. A site at which a master storage device and a master host are installed is referred to as a master site. On the other hand, a storage device serving as a copy destination of data is referred to as a remote storage device. A host connected to a remote storage device is referred to as a remote host. A site at which a remote storage device and a remote host are installed is referred to as a remote site. An operation to copy data from a particular site to another site geographically separated from the particular site is referred to as a remote copy reproduction. A system implementing a remote copy reproduction is a remote copy reproduction system. A network port of a master storage device implementing remote copy reproduction is referred to as a master port. A network port of a remote storage device implementing remote copy reproduction is referred to as a remote port. A pair consisting of the address of a master port and the address of a remote port is referred to as a port pair.
A remote copy reproduction can be synchronous or asynchronous. In a synchronous remote copy reproduction, a write operation carried out by the master host is completed when the remote copy reproduction of write data is finished. In an asynchronous remote copy reproduction, on the other hand, a write operation carried out by the master host is completed when the master storage device saves the write data in a memory. Afterwards, the master host produces a remote copy of the data saved in the memory.
In order to prevent important data from being lost in an inter-site communication in a remote copy reproduction system, normally, a protocol such as the TCP/IP capable of assuring reliability is adopted in such an inter-site communication. To put it concretely, a transmission-side node holds a copy of transmitted data in a memory area dedicated for communications and, in order to assure reliability, the data is transmitted repeatedly till a acknowledgement notice is received from the reception-side node. The memory area dedicated for communications is a set of pages allocated by the remote copy reproduction system dedicatedly to the protocol of the network. In this case, a page is a fixed-length storage-area unit, which is obtained as a result of dividing a memory. The remote copy reproduction system executes a memory management function to divide a page into memory buffers each for storing data of a fixed amount. The memory buffers are cataloged on a free-buffer pool, which is a pool of available memory buffers. When the remote copy reproduction system receives a buffer allocation request, the remote copy reproduction system takes a memory buffer having a required size specified in the request out of the free-buffer pool, and allocates the memory buffer to a communication of the TCP connection or the like. If the sizes of the available memory buffers in the free-buffer pool are not sufficient for the required size, the remote copy reproduction system further divides an unallocated page into new memory buffers and catalogs the new memory buffers in the free-buffer pool as additional memory buffers. If the memory area dedicated for communications does not include an unallocated page anymore, the remote copy reproduction system finds out a new page from a memory resource of the remote copy reproduction system. If the remote copy reproduction system does not have an available memory resource, an error message indicating a memory deficit is issued. In the following description, the size of the free-buffer pool is referred to as an available-buffer size and a space of memory buffers allocated to a communication as buffers for holding a copy of transmitted data is referred to simply as a buffer.
The required size of this buffer is proportional to the latency and bandwidth of the network path. The latency of the network path is a period of time between a transmission of data from the transmission-side node and a reception of an acknowledgement notice from the reception-side node. Since the latency and the bandwidth vary from path to path, when a network path is changed in the course of a communication due to occurrence of a failure or the like, the latency of the network path also changes as well. In addition, the latency and bandwidth of a network path also vary in accordance with whether or not a load of a network device and communication traffic congestions exist on network paths. Since the latency and the bandwidth vary in the course of a communication as described above, as a result, the size of the buffer must also be changed as well during the communication.
If the size of the buffer is kept at a fixed value without regard to variations of the network path, there is raised a problem of deteriorating communication performance. That is to say, the amount of data that the transmission-side node is capable of transmitting without waiting for an acknowledgement notice cannot exceed the size or an available area of the buffer. Thus, for a small size of the buffer, the communication efficiency is also low as well. If the size of the buffer is excessively large, on the other hand, another problem is raised. That is to say, if the transmission-side device transmits data of an amount exceeding the data transmission power of the network path, a network device on the network path may destruct the data in some cases. If the data is destructed, the transmission-side node must retransmit the data, giving rise to a lower communication efficiency as a result. Thus, a technology is required as a technology for dynamically changing the size of the buffer in accordance with variations of the latency and bandwidth of the network path.
A technology for changing the size of the buffer in accordance with variations of the latency and bandwidth of the network path is disclosed in documents including Japanese Patent Laid-open No. 2002-208,981. In accordance with this technology, a pre-assigned-buffer size allocated to each connection is changed in dependence on the rate of utilization of the buffer assigned in advance. To put it in detail, when a connection is created, the maximum and minimum values of the size of a buffer assigned in advance to the connection as well as the maximum and minimum values of the utilization rate of the buffer are set. After communications through the connection are started, for each transmission/reception operation and/or periodically, the rate of utilization of the buffer assigned in advance to the connection is examined and an average rate of utilization is found. If the average rate of utilization exceeds the maximum value set for the rate of utilization but the size of a buffer assigned in advance to the connection is still smaller than the size maximum value, the size of the buffer is increased. If the average rate of utilization is lower than the minimum value set for the rate of utilization and the size of a buffer assigned in advance to the connection is still greater than the size minimum value, on the other hand, the size of the buffer is decreased. If the latency of a network path increases, the rate of utilization of the buffer assigned in advance to a connection for the network path also increases as well but, if the latency of a network path decreases, the rate of utilization of the buffer assigned in advance to a connection for the network path also decreases as well. Thus, the technology is capable of preventing the communication performance from deteriorating.